#pragma once
#include "StaticObject.h"
#include "..\\SGD Wrappers\\SGD_Geometry.h"

enum PortalType { PORTAL_BASE = 17, PORTAL_LOADLEVEL, PORTAL_PLAYERLEVEL, PORTAL_HIDDENAREA };

class Portal : public StaticObject
{
	SGD::Point endLoc;
	bool isColliding = false;
	int level;
	int	type;

public:
	Portal();
	virtual ~Portal();

	/**********************************************************/
	// Interface:
	//	- virtual functions for children classes to override
	virtual void	Render		(void)				override;

	int				GetType		(void)	const		override	{ return type; }
	SGD::Point		GetWarpLoc	(void)	const					{ return endLoc; }
	int				GetLevel	(void)	const					{ return level; }
	
	void			SetWarpLoc	(SGD::Point warpLoc)			{ endLoc = warpLoc; }
	void			SetLevel	(int path)						{ level = path; }
	void			SetType		(PortalType t)					{ type = t; }
	virtual void	SetPosition	(SGD::Point pos)	override	{ m_ptPosition.y = pos.y - m_szSize.height;
																	m_ptPosition.x = pos.x; }

	SGD::Rectangle	GetRect(void) const;
	virtual void	HandleCollision(GameObject* pOther)	override;
	//virtual void	HandleEvent(const SGD::Event* pEvent) override;
};

